  Apple // Game Server

Play the classics on your Woz machine without a floppy disk!


  Connect the Apple to a PC or Mac

Connect your apple // (not a mac) to your PC/Mac with an appropriate
null-modem serial cable.  See this wonderful apple telecom FAQ
<http://home.swbell.net/rubywand/Csa2T1TCOM.html> for more details.

Note: It is highly recommended you test your serial connection is
working such that you can send and receive data to and from the apple.
 For example, in Windows you can do this using Hyperterminal.  The Apple
Telecom FAQ above also has tips on how to go about testing this.  Note
the baud rate and flow control settings you used, as these will be
important to getting the java program to talk to the Apple later on.

And finally, if you have a SSC refer to the FAQ for recommended dip
switch settings if you are not too familiar with configuring the super
serial card./ /


  Obtain Java

Install java and verify you can use it from the command line by typing
"java -version" which should report java 1.5 similar (this will NOT work
with java 1.4 or earlier!)

    * Java 1.5 for Windows, Linux and Solaris is available directly from
      Sun: http://java.sun.com/j2se/1.5.0/download.jsp
    * Java 1.5 for  Mac OS X is available directly from Apple:
      http://www.apple.com/support/downloads/java2se50release1.html
      <http://www.apple.com/support/downloads/java2se50release1.html%20>


  Download the apple game server

Download the latest binary release
<http://prdownload.berlios.de/a2gameserver/a2gameserver-binary-1.0.zip>.
 If you would like to see how the java or apple code sections work, feel
free to grab the source files
<http://prdownload.berlios.de/a2gameserver/a2gameserver-source-1.0.zip>
as well.  Decompress them all to the same base directory (the bundle
packages should go in the /lib/data directory and the binary should be
mostly contained in the /dist directory.)
The binary distribution contains a Win32 build of the RXTX library
<http://www.rxtx.org/>.  If you're using windows, go on to the next step.

If you are using Linux, Mac OSX, or Solaris (really?) then you should
get the appropriate port of the rxtx native libraries for your platform
from here <http://users.frii.com/jarvi/rxtx/download.html>.  Once you've
obtained the compiled libraries, place them in the lib directory (and
you can chuck out the win32 libraries since you're not worshiping the
evil empire today)

  Set up the game server

In the lib/data subdirectory there is a file called init.txt.  This is a
regular text file tht can be modified to suit your setup as you see fit.
 The first character of each line signifies a specific way in which that
line should be interpreted.  This behavior is explained in greater
detail in the Technical Details section.  Lines 16-21 are of greater
importance when you're getting acquainted:

; Change this statement to the appropriate flow control
; (for //e,//gs use HARDWARE or (maybe) XON, for //C use NONE)

!flow HARDWARE

; Change this statement to the baud rate your machine defaults to

!goto try19200

The !flow  command instructs the java program what type of flow control
to use when communicating with the apple.  When you tested your
connection previously (you did this, right? ;-) you should have been
able to determine what setting worked best for your computer.  If not,
you can try one of the recommended settings (and if you have to guess
you have a 1 in 3 chance of getting it right anyway)

The !baud command sets the java program's local baud rate.  (The apple's
baud rate must be set by sending code to the apple to reconfigure
itself, which is why the apple's inital baud rate and flow control must
be known upfront.)

The driver.txt file is explained in detail in the technical details
page.   You shouldn't have to worry about it.


  Run the game server program

Boot the apple computer and press ctrl+reset to get to the basic prompt
(you should see a ] and a blinking checkerboard cursor).  Type (/or
mutter as an incantation if you listen to RetroBits/) IN#2 and press
return.  The cursor will reappear, just leave it alone.  If you are
using an apple computer with a super serial card, type CTRL-A 2S so that
the super serial card will echo typed characters back to the host computer.

On the pc/mac, enter a command shell (For example: start -> run ->
cmd.exe (enter)) and go into the project directory and type:

*java -Djava.library.path=lib -cp
lib;lib/RXTXcomm.jar;dist/DiskServer.jar Diskserver /COM2/** *

(where COM2 means you have already connected the apple to your pc's COM2
port -- you can change this to any com port or what best suits your
environment.)

*For Linux / Mac:*

Assuming the user has permissions to access the serial port (in this
case, /ttyS0/ being the equivalent of /COM1 /under Windows), running
thiscommand in the project's directory starts it up fine.

*java -Djava.library.path=lib -cp
lib:lib/RXTXcomm.jar:dist /DiskServer.jar Diskserver //dev/ttyS0/*

(Thanks to TJ Nardi for letting me know how to run it on Linux!  Go Java!) 

If all goes well, you should see a menu of games appear on the apple
within a minute or so.  If the startup process is not successful, you
should see some sort of error from the java program.  Refer to the FAQ
for help on common error messages.

